<template>
  <div>
    <!-- <h1>子组件专栏详情</h1> -->
    <div>
      <div class="div_detail">
        <span @click="editdetail"> < </span>
        <span>专栏详情</span>
        <span></span>
      </div>

      <div>
        <h1 class="h1_detail">{{ detailist.title }}</h1>
        <img :src="detailist.pic" alt="" height="250px" />
        <div v-html="detailist.content" class="div_deatliss">
          {{ detailist.content }}
        </div>
      </div>
      
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      detailist: {},
    };
  },
  mounted() {
    console.log(111)
    var id = this.$route.query.id;
    console.log(id);
    this.$APL
      .DETAIL({
        params: {
          id: id,
        },
      })
      .then((res) => {
        // console.log(res.data.data);
        this.detailist = res.data.data;
      });
  },
  methods: {
    editdetail() {
      window.history.back();
    },
  },
};
</script>

<style lang="scss">
.div_detail {
  width: 100%;
  height: 1rem;
  background: goldenrod;
  display: flex;
  align-items: center;
  justify-content: space-around;
  //   position: relative;
  span {
    &:nth-child(1) {
      font-size: 0.5rem;
    }
  }
}
.h1_detail {
  width: 100%;
  text-align: center;
  font-size: 0.5rem;
  margin: 0.2rem;
}
.div_deatliss {
  margin: 0.2rem;
  // height: 0.3rem;
  line-height: 0.6rem;
}

</style>